<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>语法学习!</title>

</head>
<body>
<h2>遍历List集合</h2>

<table border="1">
    <tr>
        <td>序号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>钱包</td>
        <td>生日</td>
    </tr>
    <#if stus??>
        <#list stus as stu>
            <#if stu.name == '小明'>
                <tr style="color: red">
                    <td>${stu_index+1}</td>
                    <td>${(stu.name)!''}</td>
                    <td>${(stu.age)!''}</td>
                    <td>${(stu.money)!''}</td>
                    <td>${stu.birthday?string("yyyy年MM月dd日 HH:mm:ss")}</td>
                </tr>
            <#else>
                <tr style="color: #0e9ce5">
                    <td>${stu_index+1}</td>
                    <td>${(stu.name)!''}</td>
                    <td>${(stu.age)!''}</td>
                    <td>${(stu.money)!''}</td>
                    <td>${stu.birthday?string("yyyy年MM月dd日 HH:mm:ss")}</td>
                </tr>
            </#if>
        </#list>
    </#if>

</table>
</body>
</html>